<!DOCTYPE html>
<html>
<head>
<title>{$site_name}-上传图片-会员中心</title>
<meta name="keywords" content="{$site_seo_keywords}" />
<meta name="description" content="{$site_seo_description}">
<link href="__PUBLIC__/js/WebUpload/webuploader.css"  rel="stylesheet" type="text/css">
<link href="__PUBLIC__/js/artDialog/skins/default.css" rel="stylesheet" />
<tc_include file="Public:head" />
<style type="text/css">
  .webuploaderlist {
  margin: 0px;
}
.webuploaderlist li {
  list-style-type:none;
  width: 150px;
  height:150px;
  text-align:center;
  border:1px dashed #a9b7b7;
  display:block;
  position: relative;
    display: inline;
  float:left;
}
.webuploaderlist li.hide {
  display:none;
}
.webuploaderlist li img {
  max-width:100%;
  max-height:100%;
  margin: 0 auto;
  display: table-cell;
  vertical-align: middle;
}
.webuploaderlist li span {
  position:absolute;
  width:20px;
  height:20px;
  background:#FFF;
  opacity:0.5;
  filter:alpha(opacity=50);
  border-radius:5px;
  cursor: pointer;
  text-align:center;
  display:block;
  z-index:1000;
  top: 2px;
}
.webuploaderlist li span.view {
  left:2px;
  color:green;
}
.webuploaderlist li span.delete {
  right:2px;
  color:red;
}
.webuploaderlist li:last-child {
  padding:5px 5px 0px;
  height: auto;
}
</style>
</head>

<body class="body-white" id="top">
	<tc_include file="Public:nav" />

	<div class="container tc-main">
        <div class="row">
            <div class="span2">
                <tc_include file="Public:usernav"/>
            </div>
            <div class="span10">
    
               <div class="tab-content">
                   <div class="tab-pane active" id="one">
                   		
						<form class="form-horizontal" id="ff" action="{:leuu('center/ad')}" method="post">
							<input type="hidden" name="id" value="{$info.id}">
							<div class="control-group">
	                          <label class="control-label">图片上传</label>
	                          <div class="controls">
	                              <div style="text-align: center;">
	                                <ul class="webuploaderlist">
	                                  <li id="imgs1">
	                                    <img src="__TMPL__Public/images/uploader.png" />
	                                  </li>
	                                </ul>
	                              </div>
                                <span class="help-inline">建议尺寸640*320</span>
	                          </div>
	                        </div>
	                        <div class="control-group">
                   				<div class="controls">
			
                   					<button type="button" class="btn btn-primary js-ajax-submit" id="subbtn">保存</button>
                   				</div>
                   			</div>
						</form>
                   </div>
               </div>
            </div>
        </div>
		<tc_include file="Public:footer" />
	</div>
	<!-- /container -->
	<tc_include file="Public:scripts" />
	<script type="text/javascript" src="__PUBLIC__/js/uploader.js"></script>
	<script type="text/javascript">
    //编辑器路径定义
    var editorURL = GV.DIMAUB;
    webupload('imgs1', 'pics', false<notempty name="info.pics">, '<foreach name="info.pics" item="vo"><gt name="key" value="0">,</gt>{:sp_get_asset_upload_path($vo['url'])}</foreach>'</notempty>);
    $('#subbtn').click(function() {
    $.post("{:leuu('Center/ad')}",$('#ff').serialize(),function(data) {
      if(data.status == 1) {
        if(data.url) {
          window.location.href=data.url;
        } else {
          location.reload();
        }
      } else {
        alert(data.info);
      }
    })
  });
  </script>
</body>
</html>